package com.zhanhong.opencvdemo.config;

import com.zhanhong.opencvdemo.model.OpenCVConfigBean;

public final class RecognitionConfig {

    public enum RecognitionConfigName {
        MODE_SHARP,
        MODE_NORMAL,
        MODE_OBTUSE,
    }

    private static final OpenCVConfigBean MODE_SHARP = new OpenCVConfigBean(5, 35, 15, 1.1F);

    private static final OpenCVConfigBean MODE_NORMAL = new OpenCVConfigBean(7, 65, 25, 1.2F);

    private static final OpenCVConfigBean MODE_OBTUSE = new OpenCVConfigBean(9, 95, 35, 1.3F);

    public static OpenCVConfigBean getRecognitionParam(String name) {
        switch (name) {
            case "MODE_SHARP":
                return MODE_SHARP;
            case "MODE_OBTUSE":
                return MODE_OBTUSE;
            default:
                return MODE_NORMAL;
        }
    }

}
